//该文件专门创建整个应用的路由器
import VueRouter from 'vue-router'

//创建并暴露一个路由器
export default new VueRouter({
  routes: [
    // 首页
    {
      path: '/',
      redirect: '/login'
    },
    {
      path: '/index',
      component: () => import('../views/index.vue')
    },
    {
      path: '/login',
      component: () => import('../views/login.vue')
    },
    {
      path: '/mine',
      component: () => import('../views/mine.vue')
    },
    {
      path: '/addProblem',
      component: () => import('../views/addProblem.vue')
    },
    {
      path: '/problemResult',
      component: () => import('../views/problemResult.vue')
    },
    {
      path: '/problemDetail',
      component: () => import('../views/problemDetail.vue')
    },
    {
      path: '/toDoList',
      component: () => import('../views/toDoList.vue')
    },
    {
      path: '/problemDetailChange',
      component: () => import('../views/problemDetailChange.vue')
    },
  ]
})
